package com.carey.myblog.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.carey.myblog.pojo.Blog;
import com.baomidou.mybatisplus.extension.service.IService;
import com.carey.myblog.pojo.BlogTags;
import com.carey.myblog.pojo.Type;
import com.carey.myblog.vo.BlogQuery;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
* @author carey-
* @description 针对表【t_blog】的数据库操作Service
* @createDate 2022-05-25 22:09:39
*/
public interface BlogService extends IService<Blog> {
    Blog getBlog(Long id);

    Blog getAndConvert(Long id);

    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);

    Page<Blog> listBlog(Pageable pageable);

    Page<Blog> listBlogforadmin(Pageable pageable,BlogQuery blog);

    Page<Blog> listBlog(String query,Pageable pageable);

    Page<Blog> listBlog(List<BlogTags> blogTags, Pageable pageable);

    Integer saveBlog(Blog blog);

    Integer updateBlog(Long id,Blog blog);

    void deleteBlog(Long id);

    List<Blog> listRecommendBlogTop(int i);

    Integer getCount(Long typeid);

    Map<String,List<Blog>> archiveBlog();

    Integer countBlog();
}
